#!/usr/bin/env python
# -*- coding: utf-8 -*-
import  socket
ip_port = ('127.0.0.1',8000)
sk = socket.socket()
sk.bind(ip_port)
sk.listen(5)
print("waiting........")
conn,addr = sk.accept()
inp = input(">>>")
conn.send(bytes(inp,'utf8'))#传字节bytes

conn.close()